package com.sjs.boot.dynamic.protocol;

import java.nio.charset.Charset;

/**
 * @author uto_dev_008
 * @desc
 * @since 2021/11/9 19:23
 */
public final class Const {
    public static final String DEFAULT_ENCODING = "UTF-8";

    public static final Charset DEFAULT_CHARSET = Charset.forName(DEFAULT_ENCODING);

    public static final String DEFAULT_LANGUAGE = "zh_CN";
    public static String PARA_VERSION = "__ver";
    public static String RESULT = "code";
    public static String REASON = "msg";

    public static final String SUCCESS = "Success";

    public static final String XML_CONTENT_TYPE = "text/xml;charset=utf-8";
    public static final String HTML_CONTENT_TYPE = "text/html;charset=utf-8";
    public static final String TEXTPLAIN_CONTENT_TYPE = "text/plain;charset=utf-8";
    public static final String JSON_CONTENT_TYPE = "application/json;charset=utf-8";
    public static final String REST_CONTENT_TYPE = "application/x-www-form-urlencoded;charset=utf-8";
    public static final String BIN_CONTENT_TYPE = "application/octet-stream";

    public static final void setResultCodeName(String resultCodeName) {
        RESULT = resultCodeName;
    }

    public static final void setReasonName(String reasonName) {
        REASON = reasonName;
    }
}
